Skip to content

✅ Add E2E tests for embedded config scenarios#4242

Draft
mormubis wants to merge 1 commit into
adlrb/ssi-endpoint-2from
adlrb/ssi-e2e
Draft

✅ Add E2E tests for embedded config scenarios#4242
mormubis wants to merge 1 commit into
adlrb/ssi-endpoint-2from
adlrb/ssi-e2e

Conversation

@mormubis
Copy link
Copy Markdown
Contributor

Motivation

Validate that the full embedded config pipeline works end-to-end: generate a bundle with @datadog/browser-sdk-endpoint, serve it via the test server, and verify the SDK initializes correctly with the embedded configuration.

Changes

New E2E scenarios (15 tests total)

embeddedConfig.scenario.ts (8 tests):

  • SDK loads with embedded config (rum and rum-slim variants)
  • No remote config network requests during page load (config is pre-embedded)
  • Bundle metadata verified (applicationId, configId)

embeddedConfigDynamic.scenario.ts (7 tests):

  • Dynamic value markers ($cookie:name, $dom:selector, $js:path) preserved in bundle
  • Mixed static/dynamic values work correctly
  • Nested dynamic values in configuration objects

Framework additions

  • createTest.ts, pageSetups.ts, mock.ts — support for serving pre-generated bundles in E2E tests

Disabled

  • remoteConfiguration.scenario.ts.disabled (superseded by new package approach)

Testing

yarn test:e2e -g "embedded configuration"
yarn typecheck

Part of SSI Phase 6 stacked PRs. Stacks on: ✨ @datadog/browser-sdk-endpoint (#4241). Next: rum-core removal (breaking).

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Feb 25, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 172.54 KiB 172.54 KiB 0 B 0.00%
Rum Profiler 7.88 KiB 7.88 KiB 0 B 0.00%
Rum Recorder 21.21 KiB 21.21 KiB 0 B 0.00%
Logs 54.84 KiB 54.84 KiB 0 B 0.00%
Rum Slim 130.41 KiB 130.41 KiB 0 B 0.00%
Worker 22.99 KiB 22.99 KiB 0 B 0.00%

🔗 RealWorld

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 Bot commented Feb 25, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 7 Pipeline jobs failed

DataDog/browser-sdk | e2e: [chromium-pinned]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). ReferenceError: exports is not defined in ES module scope at line 3

DataDog/browser-sdk | e2e: [chromium]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). ReferenceError: exports is not defined in ES module scope at line 3.

DataDog/browser-sdk | e2e: [firefox-pinned]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). ReferenceError: exports is not defined in ES module scope at line 3.

View all 7 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 76.59% (+0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5a10587 | Docs | Datadog PR Page | Give us feedback!

@mormubis mormubis force-pushed the adlrb/ssi-endpoint-pkg branch from ae5fb37 to 5e90dd5 Compare March 3, 2026 16:45
@mormubis mormubis changed the base branch from adlrb/ssi-endpoint-pkg to adlrb/ssi-endpoint-2 May 29, 2026 10:06
@mormubis mormubis force-pushed the adlrb/ssi-endpoint-2 branch from ca036a0 to 6e529fa Compare May 29, 2026 12:14
@mormubis mormubis force-pushed the adlrb/ssi-endpoint-2 branch from 6e529fa to 6015a49 Compare May 29, 2026 12:36
@mormubis mormubis force-pushed the adlrb/ssi-e2e branch 2 times, most recently from 89ab9e8 to e574685 Compare June 1, 2026 15:08
@mormubis mormubis force-pushed the adlrb/ssi-endpoint-2 branch from 6015a49 to 2aba267 Compare June 1, 2026 15:08
@mormubis mormubis force-pushed the adlrb/ssi-endpoint-2 branch from ab5fb40 to 1bea29b Compare June 2, 2026 10:39
Adds 15 E2E tests proving the embedded config approach works end-to-end:

- SDK loads with embedded config (rum variant)
- SDK loads with embedded config (rum-slim variant)
- No remote config requests made during page load
- Bundle metadata verification (applicationId, configId in bundle)
- Config values applied to SDK initialization

- Dynamic value markers preserved in bundle (cookie, DOM selector, JS path)
- Mixed static/dynamic values work correctly
- Nested dynamic values in configuration objects

Also disables remoteConfiguration.scenario.ts (superseded by the new package approach).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant